More than just powerful analytics in your team collaboration platform.

 

Overview

Available on the Atlassian Marketplace Piwik is the leading open-source analytics platform that gives you more than just powerful analytics. Confluence is your platform where work becomes teamwork. This add-on makes integrating calls to the Piwik API from your Confluence pages much easier!

Without this Add-on

Without macros of this add-on you could call the Piwik API by adding an HTML script tag like this:

<script type='text/javascript'>
   var _paq = _paq || [];
   _paq.push(['setDocumentTitle', 'My Title']);
</script> 

With this Add-on

Using our macros allows you to simply add your information via a dialog:

The macro will take care for rendering the JavaScript snippet inside of the HTML script tag.

Macros

This add-on provides the following macros to call the API of your Piwik server:

Document Properties
Provide document properties to the Piwik context.
Set Multiple Custom Variables
Provide a set of custom variables to the Piwik context.
Set One Custom Variable
Provide a single custom variable to the Piwik context.

Configuration

To use the macros you need Piwik installed on one of your servers and to configure your Confluence server.

As a Confluence administrator add the following as General Configuration -> Custom HTML:

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
   _paq.push(['trackPageView']);
   _paq.push(['enableLinkTracking']);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://[YOUR PIWIK SERVER]";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', [YOUR SITE ID]]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
    g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="[YOUR PIWIK CALL]" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --> 

Replace the placeholder with values according to your installation.

PlaceholderDescriptionExample
[YOUR PIWIK SERVER]
The URL (without the protocol) to your Piwik server.
www.example.com/piwik/
[YOUR SITE ID]
The identifier of the site within your Piwik configuration you want to track.73
[YOUR PIWIK CALL]
The call to the Piwik API on your server in case the user has disabled JavaScript in her browser.
http://www.smartics.de/piwik/piwik.php?idsite=73
 

Please note that all macros use the JavaScript API. Therefore: If the user has JavaScript deactivated in her browser, the noscript image will be employed and the macro initiated calls will not be counted with Piwik.

For more information please refer to information provided by Piwik:

Open Source

The source code is licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, and is available on Bitbucket.

Piwik is an internationally registered trademark, currently assigned to the project’s founder and lead developer, Matthieu Aubry. Piwik is Free Software released under the GPL 3.

For more information on Piwik visit http://piwik.org.